#ifndef _PAPA_OBJECT_H_
#define _PAPA_OBJECT_H_
#include <Ogre.h>
#include <math.h>

class PapaObject
{
protected:
	Ogre::Vector3 mDirection;
	Ogre::SceneNode *mAttachedSceneNode;
	Ogre::Real mSpeed;
	Ogre::Radian mAngleSpeed;
	Ogre::Vector3 mRotateAxis;
	Ogre::Radian mAngleLeft;
	Ogre::Real mDistanceLeft;
	bool mInfinite;

	virtual void _UpdatePostion(Ogre::Real time);

public://cons & destroy
	PapaObject();
	virtual ~PapaObject(){};

public://method
	virtual void Initialization(){};
	virtual void AddTime(Ogre::Real time)=0;

public://attribute
	virtual void setAnimation(int animation){};

	virtual Ogre::Vector3  getPostion();
	virtual Ogre::Quaternion  getOrientation();
	virtual void setPostion(Ogre::Vector3 pos);
	virtual void setOrientation(Ogre::Quaternion ort);

	virtual Ogre::Real getSpeed();
	virtual void setSpeed(Ogre::Real speed);
	virtual void setDirection(Ogre::Vector3 dir);
	virtual Ogre::Vector3 getDirection();
	virtual Ogre::SceneNode* getNode();

	bool IsMoving();

	void setTargetPostion(Ogre::Vector3 des);//go to des at speed of mSpeed
	void setTargetOrientation(Ogre::Quaternion desOrt, Ogre::Real transTime);//in transTime rotate direction now to desOrt
};
#endif